# include <bits/stdc++.h>
# define lc (x << 1)
# define rc (x << 1 | 1)
# define mid ((l + r) >> 1)
# define MAXN 100005
# define ll long long
using namespace std;
inline int get_num() {
	int k = 0, f = 1;
	char c = getchar();
	for(; !isdigit(c); c = getchar())if(c == '-') f = -1;
	for(; isdigit(c); c = getchar()) k = k * 10 + c - '0';
	return k * f;
}
ll dp[MAXN], h[MAXN], n, l, r, t;
struct segtree {
	int mi[MAXN << 1], mx[MAXN << 1];
	ll sum[MAXN << 1];
	inline segtree() {
		memset(mi, 0, sizeof(mi));
		memset(mx, 0, sizeof(mx));
		memset(sum, 0, sizeof(sum));
	}
	void build(int x, int l, int r) {
		if(l == r) {
			mi[x] = h[l];
			mx[x] = h[l];
		} else {
			build(lc, l, mid);
			build(rc, mid + 1, r);
			mi[x] = min(mi[lc], mi[rc]);
			mx[x] = max(mx[lc], mx[rc]);
		}
	//	printf("%d l %d r %d mi %d mx %d\n", x, l, r, mi[x], mx[x]);
	}
	inline void add_dp(int p, int k) { //dp[p] = k;
		int x = 1, l = 1, r = n;
		while(l != r) {
			sum[x] += k;
			if(p > mid) {
				l = mid + 1;
				x = rc;
			} else {
				r = mid;
				x = lc;
			}
		}
		sum[x] += k;
	}
	ll query(int x, int l, int r, int s, int t, int down, int up) {
		if(l == s && r == t) {
			if(mi[x] > up || mx[x] < down) return 0;
			if(mx[x] <= up && mi[x] >= down) return sum[x];
			else {
				ll ans = 0;
				ans += query(lc, l, mid, s, mid, down, up);
				ans += query(rc, mid + 1, r, mid + 1, t, down, up);
				return ans;
			}
		} 
		else {
			if(t <= mid) return query(lc, l, mid, s, t, down, up);
			else if (s > mid) return query(rc, mid + 1, r, s, t, down, up);
			else {
				ll ans = 0;
				ans += query(lc, l, mid, s, mid, down, up);
				ans += query(rc, mid + 1, r, mid + 1, r, down, up);
				return ans;
			}
		}
	}
}seg;
int main() {
	freopen("cirnoisclever.in", "r", stdin);
	freopen("zj.out", "w", stdout);
	n = get_num();
	l = get_num();
	r = get_num();
	t = get_num();
	for(int i = 1; i <= n; i++) {
		h[i] = get_num();
	}
	seg.build(1, 1, n);
	dp[1] = 1;
	seg.add_dp(1, 1);
	for(int i = 1 + l; i <= n; i++) {
		dp[i] += seg.query(1, 1, n, ((i - r) <= 0) ? (1) : (i - r) , i - l, ((h[i] - t) <= 0) ? (1) : (h[i] - t), h[i] + t);
		while(dp[i] >= 998244353) dp[i] -= 998244353;
		seg.add_dp(i, dp[i]);
	}
	///*
	for(int i = 1; i <= n; i++) {
		printf("%lld\n", dp[i]);
	}
	//*/
	//printf("%lld", dp[n]);
}
